package com.llt.user.domain.user.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.llt.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author llt
 * @since 2024-11-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user_exam")
public class UserExam extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 用户竞赛关系id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(value = "user_exam_id", type = IdType.ASSIGN_ID)
    private Long userExamId;

    /**
     * 用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 竞赛id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long examId;

    /**
     * 得分
     */
    private Integer score;

    /**
     * 排名
     */
    private Integer examRank;
}
